package co.com.inventarios.modelo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ProunimedId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class ProunimedId implements java.io.Serializable {

	// Fields

	private String pumproduct;
	private String pumunimed;

	// Constructors

	/** default constructor */
	public ProunimedId() {
	}

	/** full constructor */
	public ProunimedId(String pumproduct, String pumunimed) {
		this.pumproduct = pumproduct;
		this.pumunimed = pumunimed;
	}

	// Property accessors

	@Column(name = "PUMPRODUCT", unique = false, nullable = false, insertable = true, updatable = true, length = 15)
	public String getPumproduct() {
		return this.pumproduct;
	}

	public void setPumproduct(String pumproduct) {
		this.pumproduct = pumproduct;
	}

	@Column(name = "PUMUNIMED", unique = false, nullable = false, insertable = true, updatable = true, length = 4)
	public String getPumunimed() {
		return this.pumunimed;
	}

	public void setPumunimed(String pumunimed) {
		this.pumunimed = pumunimed;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ProunimedId))
			return false;
		ProunimedId castOther = (ProunimedId) other;

		return ((this.getPumproduct() == castOther.getPumproduct()) || (this
				.getPumproduct() != null
				&& castOther.getPumproduct() != null && this.getPumproduct()
				.equals(castOther.getPumproduct())))
				&& ((this.getPumunimed() == castOther.getPumunimed()) || (this
						.getPumunimed() != null
						&& castOther.getPumunimed() != null && this
						.getPumunimed().equals(castOther.getPumunimed())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getPumproduct() == null ? 0 : this.getPumproduct()
						.hashCode());
		result = 37 * result
				+ (getPumunimed() == null ? 0 : this.getPumunimed().hashCode());
		return result;
	}

}